dart foreach

214

void main() { 
   var obj = [12,13,14]; 
   
   for (var prop in obj) { 
      print(prop); 
   } 
} 
List<int> ages = [29, 27, 42];
ages.forEach((int age) => print(age));

Comments

Submit
0 Comments